/* WebContent/css/global.css */
:root {
    /* 茶叶主题配色 */
    --primary-color: #8B9E6B;  /* 茶叶绿 */
    --success-color: #6B8E23;  /* 橄榄绿 */
    --warning-color: #D2B48C;  /* 茶褐色 */
    --danger-color: #B22222;   /* 砖红色 */
    --info-color: #A2B38B;    /* 浅茶绿 */
    --text-primary: #3C3C3C;   /* 深灰 */
    --text-regular: #5C6D46;   /* 茶叶绿深色 */
    --text-secondary: #7A8D5D; /* 茶叶绿中色 */
    --border-color: #D1D9C7;   /* 浅茶绿 */
    --bg-color: #F5F7F0;      /* 米白底色 */
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.5;
}

/* 布局样式 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 - 茶叶主题 */
.sidebar {
    width: 220px;
    background-color: #5C6D46; /* 深茶叶绿 */
    color: #fff;
    transition: width 0.3s;
    height: 100vh;
    position: fixed;
    z-index: 1001;
    overflow: hidden;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #4A5A36; /* 更深茶叶绿 */
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    padding-top: 10px;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    border-left: 3px solid transparent;
}

.menu-item i {
    margin-right: 10px;
    font-size: 16px;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--warning-color);
}

.menu-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--warning-color);
    color: #fff;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
    background-color: var(--bg-color);
    min-height: 100vh;
    transition: margin-left 0.3s;
}

/* 顶部导航栏 - 茶叶主题 */
.navbar {
    height: 60px;
    background-color: #fff;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
}

.navbar-right {
    display: flex;
    align-items: center;
}

/* 卡片样式 - 茶叶主题 */
.el-card {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.el-card__header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f9faf7;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.el-card__body {
    padding: 20px;
}

/* 表格全局样式 - 茶叶主题 */
.el-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 4px;
    overflow: hidden;
}

.el-table th {
    background-color: #f5f7f0;
    color: var(--text-regular);
    font-weight: 600;
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.el-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.el-table .cell {
    padding-left: 15px;
    padding-right: 15px;
}

.el-table tr:hover td {
    background-color: #f8f9f5;
}

/* 标签样式 - 茶叶主题 */
.el-tag {
    display: inline-block;
    padding: 0 10px;
    height: 24px;
    line-height: 24px;
    font-size: 12px;
    border-radius: 4px;
    box-sizing: border-box;
    white-space: nowrap;
}

.el-tag--success {
    background-color: #f0f5e6;
    color: var(--success-color);
    border: 1px solid #d8e3c8;
}

.el-tag--danger {
    background-color: #faeaea;
    color: var(--danger-color);
    border: 1px solid #f0d0d0;
}

/* 按钮样式 - 茶叶主题 */
.el-button {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid;
    font-weight: 500;
}

.el-button--primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.el-button--primary:hover {
    background-color: #7A8D5D;
    border-color: #7A8D5D;
}

.el-button--success {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.el-button--success:hover {
    background-color: #5C7A2E;
    border-color: #5C7A2E;
}

/* 分页样式 - 茶叶主题 */
.el-pagination {
    margin-top: 20px;
    padding: 10px 0;
    display: flex;
    justify-content: flex-end;
}

.page-link {
    display: block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    min-width: 30px;
    text-align: center;
    border-radius: 3px;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #f0f2e9;
}

.page-link.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-ellipsis {
    display: block;
    padding: 5px 10px;
    margin: 0 3px;
    color: var(--text-secondary);
}

/* 表单元素样式 - 茶叶主题 */
.el-input {
    position: relative;
    font-size: 14px;
    display: inline-block;
    width: 100%;
}

.el-input__inner {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background-color: #fff;
}

.el-input__inner:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 158, 107, 0.2);
}

/* 操作链接样式 - 茶叶主题 */
.el-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    position: relative;
    text-decoration: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.el-link--primary {
    color: var(--primary-color);
}

.el-link--primary:hover {
    color: #7A8D5D;
}

.el-link--danger {
    color: var(--danger-color);
}

.el-link--danger:hover {
    color: #C12E2E;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.ml-10 {
    margin-left: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 64px;
    }
    .main-content {
        margin-left: 64px;
    }
}

/* 侧边栏收缩相关样式 */
.sidebar.collapsed {
    width: 64px;
}

.sidebar.collapsed .sidebar-logo {
    font-size: 0;
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo::after {
    content: "🍃";
    font-size: 20px;
}

.sidebar.collapsed .menu-item {
    padding: 12px 0;
    text-align: center;
    justify-content: center;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    font-size: 18px;
}

.hamburger {
    display: inline-block;
    cursor: pointer;
    padding: 0 15px;
    font-size: 18px;
    color: #fff;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 64px;
}

/* 新增茶叶主题元素 */
.tea-icon {
    color: var(--primary-color);
    margin-right: 5px;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--danger-color);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}